package cn.dxl.base;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication //springBoot 启动类
@EnableEurekaClient //EurekaClient 客户端
@EnableDiscoveryClient//让注册中心能够发现到该服务
@EnableCircuitBreaker//激活熔断器 采集数据
@EnableHystrixDashboard//监控熔断器的界面
@EnableSwagger2   //swaggerAPI
@MapperScan(value = "cn.dxl.base.mapper")
public class BaseApplication {

    //监控的地址
    //http://localhost:7002/actuator/hystrix.stream
    //监控界面的地址
    //http://localhost:7002/hystrix
    public static void main(String[] args) {
        SpringApplication.run(BaseApplication.class);
    }
}
